package edu.gdut.thesissys.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Gkdb entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "gkdb", catalog = "gdutmis")
public class Gkdb extends BaseVo implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -2951073699514118080L;
	private String studentId;
	private Student student;
	private String name;
	private String score;

	// Constructors

	/** default constructor */
	public Gkdb() {
	}

	/** minimal constructor */
	public Gkdb(String studentId, Student student) {
		this.studentId = studentId;
		this.student = student;
	}

	/** full constructor */
	public Gkdb(String studentId, Student student, String name, String score) {
		this.studentId = studentId;
		this.student = student;
		this.name = name;
		this.score = score;
	}

	// Property accessors
	@Id
	@Column(name = "student_id", unique = true, nullable = false, length = 10)
	public String getStudentId() {
		return this.studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "student_id", unique = true, nullable = false, insertable = false, updatable = false)
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "score")
	public String getScore() {
		return this.score;
	}

	public void setScore(String score) {
		this.score = score;
	}

}